package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Set;


/**
 * The persistent class for the TM_CAPITANIA database table.
 * 
 */
@Entity
@Table(name="TM_CAPITANIA")
public class TmCapitania implements Serializable {
	private static final long serialVersionUID = 1L;
	private String codCapitania;
	private String descripcion;
	private Set<RegBuque> regBuques;
	private Set<RegEmbPesq> regEmbPesqs;
	private Set<RegNave> regNaves;

    public TmCapitania() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="COD_CAPITANIA", unique=true, nullable=false, length=5)
	public String getCodCapitania() {
		return this.codCapitania;
	}

	public void setCodCapitania(String codCapitania) {
		this.codCapitania = codCapitania;
	}


	@Column(length=40)
	public String getDescripcion() {
		return this.descripcion;
	}

	public void setDescripcion(String descripcion) {
		this.descripcion = descripcion;
	}


	//bi-directional many-to-one association to RegBuque
	@OneToMany(mappedBy="tmCapitania")
	public Set<RegBuque> getRegBuques() {
		return this.regBuques;
	}

	public void setRegBuques(Set<RegBuque> regBuques) {
		this.regBuques = regBuques;
	}
	

	//bi-directional many-to-one association to RegEmbPesq
	@OneToMany(mappedBy="tmCapitania")
	public Set<RegEmbPesq> getRegEmbPesqs() {
		return this.regEmbPesqs;
	}

	public void setRegEmbPesqs(Set<RegEmbPesq> regEmbPesqs) {
		this.regEmbPesqs = regEmbPesqs;
	}
	

	//bi-directional many-to-one association to RegNave
	@OneToMany(mappedBy="tmCapitania")
	public Set<RegNave> getRegNaves() {
		return this.regNaves;
	}

	public void setRegNaves(Set<RegNave> regNaves) {
		this.regNaves = regNaves;
	}
	
}